package main;

import my_util.MyBinTree;
import my_util.MyCBinTree;

import java.util.ArrayList;

public class Main_Tree {
    public static void main(String[] args) {
//        String str="ABD@GJ@@K@@E@@C@FH@@IL@@@";
        String str="ABCDEFGHIJKLMNOPQ";
        ArrayList<Character>al=new ArrayList<>();
        for(int i=0;i<str.length();i++){
            al.add(str.charAt(i));
        }
//        MyBinTree <Character>tree=new MyBinTree<Character>(al,'@');
        MyCBinTree <Character>tree=new MyCBinTree<Character>(al);
        tree.preOrder();
        System.out.println();
        tree.inOrder();
        System.out.println();
        tree.postOrder();
        System.out.println();
        System.out.println(tree.height());
        System.out.println(tree.size());
        System.out.println(tree.leafSize());
        System.out.println(tree.getTop());
//        System.out.println(tree.size());
//        System.out.println(tree.leafSize());
//        System.out.println(tree.height());
    }
}
